package com.slz3.business.module.drawManagement.draParticipateMember.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.drawManagement.draParticipateMember.domain.DraParticipateMember;
import com.slz3.business.module.drawManagement.draParticipateMember.domain.DraParticipateMemberCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class DraParticipateMemberResController extends DraParticipateMemberResAtomic {

    public Mono<ServerResponse> add(ServerRequest req, DraParticipateMember draParticipateMember) {
        if (DraParticipateMemberResUnsafeValid.add(req, draParticipateMember)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.add_$DraParticipateMemberUpdateLock(req, draParticipateMember);
        }
    }

    public Mono<ServerResponse> delete(ServerRequest req, DraParticipateMemberCondition draParticipateMemberCondition) {
        if (DraParticipateMemberResUnsafeValid.delete(req, draParticipateMemberCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.delete_$DraParticipateMemberUpdateLock(req, draParticipateMemberCondition);
        }
    }

    public Mono<ServerResponse> modify(ServerRequest req, DraParticipateMember draParticipateMember) {
        if (DraParticipateMemberResUnsafeValid.modify(req, draParticipateMember)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.modify_$DraParticipateMemberUpdateLock(req, draParticipateMember);
        }
    }

    public Mono<ServerResponse> list(ServerRequest req) {
        if (DraParticipateMemberResUnsafeValid.list(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.list(req);
        }
    }

    public Mono<ServerResponse> info(ServerRequest req) {
//        return draParticipateMemberResAtomic.info_$DraParticipateMemberUpdateLock(req);
        if (DraParticipateMemberResUnsafeValid.info(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.info_$DraParticipateMemberUpdateLock(req);
        }
    }

    public Mono<ServerResponse> choice(ServerRequest req) {
        if (DraParticipateMemberResUnsafeValid.choice(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.choice(req);
        }
    }

    public Mono<ServerResponse> auditSubmit(ServerRequest req, DraParticipateMemberCondition draParticipateMemberCondition) {
        //
        if (DraParticipateMemberResUnsafeValid.auditSubmit(req, draParticipateMemberCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.auditSubmit_$DraParticipateMemberUpdateLock(req, draParticipateMemberCondition);
        }
    }

    public Mono<ServerResponse> audit(ServerRequest req, DraParticipateMemberCondition draParticipateMemberCondition) {
        if (DraParticipateMemberResUnsafeValid.audit(req, draParticipateMemberCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.audit_$DraParticipateMemberUpdateLock(req, draParticipateMemberCondition);
        }
    }

    public Mono<ServerResponse> auditReject(ServerRequest req, DraParticipateMemberCondition draParticipateMemberCondition) {
        if (DraParticipateMemberResUnsafeValid.auditReject(req, draParticipateMemberCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.auditReject_$DraParticipateMemberUpdateLock(req, draParticipateMemberCondition);
        }
    }

    public Mono<ServerResponse> usingEnable(ServerRequest req, DraParticipateMemberCondition draParticipateMemberCondition) {
        if (DraParticipateMemberResUnsafeValid.usingEnable(req, draParticipateMemberCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.usingEnable_$DraParticipateMemberUpdateLock(req, draParticipateMemberCondition);
        }
    }

    public Mono<ServerResponse> usingDisable(ServerRequest req, DraParticipateMemberCondition draParticipateMemberCondition) {
        if (DraParticipateMemberResUnsafeValid.usingDisable(req, draParticipateMemberCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.usingDisable_$DraParticipateMemberUpdateLock(req, draParticipateMemberCondition);
        }
    }

}
